<?php

namespace app\common\service\order;

use app\common\model\order\ShopOrderCommentModel;

/**
 * 发布评论/追加评论
 */
class ShopOrderCommentService
{
    /**
     * 添加、修改字段
     * @var array
     */
    public static $edit_field = [
        'id'=>'',
        'merchant_id'=>'',
        'shop_order_id'=>'',
        'store_platform_id'=>'',
        'shop_product_type_id'=>'',
        'setting_price_range_id'=>'',
        'comment_status'=>'',
        'comment_type'=>'',
        'comment_type_code'=>'',
        'content'=>'',
        'comment_image_id'=>'',
        'comment_vido_id'=>'',
        'push_time'=>'',
        'is_anonymous'=>'',
        'is_close_comments'=>'',
        'commission'=>'',
        'mer_commission'=>'',
        'status'=>'',
        'is_delete'=>'',
        'create_uid'=>'',
        'update_uid'=>'',
        'delete_uid'=>'',
        'create_time'=>'',
        'update_time'=>'',
        'delete_time'=>'',
        'submit_time'=>'',
        'auth_time'=>'',
        'success_time'=>'',
    ];

    public static function getShopOrderIds($where = [])
    {
        $model = new ShopOrderCommentModel();
        $list = $model->where($where)->field('shop_order_id')->select()->toArray();
        $ids=array_column($list,'shop_order_id');
        return $ids;
    }
}
